<?php if (!defined('BASEPATH')) {exit('No direct script access allowed');}

class mAuthent extends CI_Model {

	function __construct() {
		parent::__construct();
	}

	function get_user($data){
		return fetchArray("select adminname from admins where adminname='$data[username]' and psw='$data[password]'", 'one');
	}
	
	// function get_id($data){
		// return fetchArray("select userid from user where username='$data[username]' and password='$data[password]'", 'one');
	// }
	
	// function new_user($data){
		// $this->db->query("INSERT INTO `db_soc_med`.`user` (`USERID`, `IDUG`, `USERNAME`, `PASSWORD`, `STATUS`) VALUES (NULL, 'user', '$data[username]', '$data[password]',1)");
	// }
	
	// function set_profile($act, $data, $id){
		// if ($act == 'new'){
			// $this->db->query("INSERT INTO `db_soc_med`.`profile`
				// (`EMAIL` ,`USERID` ,`FIRST_NAME` ,`LAST_NAME` ,`TGL_LAHIR` ,`ALAMAT` ,`GENDER` ,`NO_TELEPON`)
				// VALUES ('$data[email]', '$id', '$data[f_name]', '$data[l_name]', '$data[lahir]', '$data[alamat]', '$data[gender]', '$data[telepon]')");
		// }
	// }
	
	// function get_profile($userid){
		// return fetchArray("select * from profile where userid='$id'", 'row');
	// }
}